package com.wei.myhame.ui.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.wei.myhame.MainActivity;
import com.wei.myhame.R;
import com.wei.myhame.base.BaseActivity;
import com.wei.myhame.base.interfaces.IPresenter;

public class CheckInActivity extends BaseActivity {
    RelativeLayout relativeBackMain,RelativeCheckIn,RelativeRegister;
    ImageView fyimg;
    TextView texttopname;
    Button buttonBack;


    @Override
    protected int getLayout() {
        return R.layout.activity_check_in;
    }

    @Override
    protected IPresenter createPresenter() {
        return null;
    }

    @Override//接口的方法
    protected void initView() {

    }

    @Override//初始化数据的方法
    protected void initData() {
        relativeBackMain=findViewById(R.id.relativeBackMain);//返回首页
        RelativeCheckIn=findViewById(R.id.RelativeCheckIn);//预约报到
        RelativeRegister=findViewById(R.id.RelativeRegister);//访客登记
        fyimg=findViewById(R.id.fyimg);//法院图片
        texttopname=findViewById(R.id.texttopname);//法院顶部名
        buttonBack=findViewById(R.id.buttonBack);//返回上一级按钮


        //返回首页点击事件
        relativeBackMain.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(CheckInActivity.this, MainActivity.class);
                startActivity(intent);
                finish();
            }
        });
        //返回上一级的点击事件
        buttonBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(CheckInActivity.this, ChooseIdActivity.class);
                startActivity(intent);
                finish();
            }
        });
        //预约报到点击事件
        RelativeCheckIn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(CheckInActivity.this, CheckInParticularsActivity.class);
                startActivity(intent);
                finish();
            }
        });
        //访客登记的点击事件
        RelativeRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(CheckInActivity.this, RegisterParticularsActivity.class);
                startActivity(intent);
                finish();
            }
        });
    }
}
